home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / bash_114.zip / bash-1.14.2 / INSTALL < prev    next >
Text File  |  1994-07-08  |  8KB  |  210 lines

  1. File: bash.info,  Node: Install,  Next: Invoke,     Prev: Built-in,  Up: Top
  2.  
  3. Installing BASH
  4. ***************
  5.  
  6. To install BASH you simply type `make'.     The BASH `Makefile' tries
  7. to dynamically figure out what kind of machine and operating system
  8. you are using.    It makes an educated guess based on the information
  9. it finds.
  10.  
  11. During the `make' process, a message is displayed describing what
  12. machine and operating system has been chosen for you.  This
  13. information is also saved in the file `.machine' so you can look at
  14. it later.
  15.  
  16. Therefore, for most machines, simply follow this simple checklist
  17. to install BASH:
  18.  
  19.   1. Type `make'.  If you want to use GCC to compile bash, type
  20.      `make CC=gcc CPPNAME='$(CC) -E''.
  21.  
  22.   2. Wait for the compilation to finish.
  23.  
  24.   3. Type `./bash' to see if the compile worked.
  25.  
  26.   4. Type `make install bindir=/usr/gnu/bin' (or wherever you
  27.      keep GNU binaries) to copy bash to your binaries directory.
  28.  
  29. * Menu:
  30.  
  31. * Problems::  What to do if BASH doesn't install quite so easily.
  32.  
  33. * Files::     Files used in the `make' process.
  34.  
  35. * Porting::   Porting BASH to a new machine.
  36.  
  37. * Bugs::      What to do if you Discover Bugs in BASH.
  38.  
  39.  
  40. File: bash.info,  Node: Problems,  Next: Files,     Prev: Install,     Up: Install
  41.  
  42. What if it Doesn't Install so Easily?
  43. =====================================
  44.  
  45. Sometimes BASH gets confused and will make the wrong assumptions
  46. about your machine or operating system.     If the displayed
  47. information (also found in `.machine') is incorrect, you will have
  48. to edit the file `machines.h' and provide the appropriate
  49. information so that BASH can be installed correctly.  The complete
  50. instructions for doing this are located in the `machines.h' file.
  51.  
  52. However, if BASH says that your machine type is an
  53. "UNKNOWN_MACHINE", or BASH thought it knew something about your
  54. machine but was wrong, then reading the next few sections could
  55. be of use to you (*note Files::., and *note Porting::., for more
  56. information). 
  57.  
  58. On the MIPSEB with the BSD universe, you must:
  59.  
  60. 1) Place /bsd43/bin in your PATH before /bin
  61. 2) Use $(CC) -E instead of /lib/cpp to build cpp-Makefile.
  62.  
  63. On SCO Xenix 386, you must:
  64.  
  65. 1) Use $(CC) -E instead of /lib/cpp to build cpp-Makefile.
  66.  
  67. On Interactive Unix version 3 or 4, you must:
  68.  
  69. 1) Edit cpp-Makefile to remove either -O or -g from DEBUG_FLAGS
  70.  
  71. File: bash.info,  Node: Files,    Next: Porting,    Prev: Problems,     Up: Install
  72.  
  73. Files Used in the `make' Process.
  74. =================================
  75.  
  76. The following files are used during the installation of BASH, in
  77. the `make' process:
  78.  
  79. `Makefile'
  80.      This is responsible for making the actual `Makefile' that is
  81.      used to create Bash.  It runs the C preprocessor (usually
  82.      located in `/lib/cpp') on the file `cpp-Makefile', producing
  83.      the output file `bash-Makefile'.
  84.  
  85. `cpp-Makefile'
  86.      This is a file of C comments and text.  It contains a
  87.      reasonable number of `ifdefs' which control what files get
  88.      compiled and which flags are passed to the various C files
  89.      comprising BASH.  It includes files named `machines.h',
  90.      `sysdefs.h', and `config.h'.
  91.  
  92. `machines.h'
  93.      This file contains the basic compilation parameters for all of
  94.      the machines to which BASH has been ported.  This file
  95.      consists of a series of conditional blocks, one per machine
  96.      type.
  97.  
  98.      These conditional blocks are depend upon the unique identifier
  99.      that `cpp' has predefined for this machine.  In some cases,
  100.      additional information can be passed from `Makefile'.  It is
  101.      possible to pass information such as whether or not a
  102.      particular file is available on this system, and so on.
  103.  
  104. `sysdefs.h'
  105.      This file is dynamically made at build time by running the shell
  106.      script `support/mksydefs'.  If there appears to be something wrong
  107.      in this file, then edit the `mksysdefs' script, and mail the
  108.      changes that you make to bash-maintainers@prep.ai.mit.edu.
  109.  
  110. `bash-Makefile'
  111.      This is the output from the initial stage of `make'.  It is a
  112.      stripped down version of `cpp-Makefile' which is tailor-made
  113.      for your machine and operating system.  All subsequent `makes'
  114.      use this file.
  115.  
  116.  
  117. File: bash.info,  Node: Porting,  Next: Bugs,  Prev: Files,  Up: Install
  118.  
  119. What if You Have to Port to a New Machine?
  120. ==========================================
  121.  
  122. Sometimes you may want to port BASH to a new, previously
  123. unsupported machine.  To do so you need to create a block in
  124. `machines.h' which is conditional based on a unique identifier
  125. present in your version of the C preprocessor.
  126.  
  127. If you don't know what that symbol is, you might try the following
  128. simple test:
  129.  
  130.      echo "main () { }" > foo.c
  131.      cc -v foo.c
  132.  
  133. You are looking for `-DMACHINE', where `MACHINE' is an identifier
  134. for your machine.  If you are very unlucky and your machine's C
  135. preprocessor doesn't have a unique identifier, you will have to
  136. define the identifier in Makefile manually.
  137.  
  138. Let's say you have a machine from Yoyodyne Industries, called the
  139. YoYo.  It runs a version of BSD, so it is reasonably compatible. 
  140. However, the `cpp' on this YoYo machine doesn't define any unique
  141. identifiers.  You should change the `Makefile' line for `CPPFLAGS'
  142. to:
  143.  
  144.      CPPFLAGS = -P -DYoYo
  145.  
  146. Then, in `machines.h', you copy the block for `UNKNOWN_MACHINE',
  147. and change the conditional to;
  148.  
  149.      #if defined (YoYo)
  150.  
  151. Inside of the YoYo block you define `M_MACHINE="YoYo"', and
  152. `M_OS=Bsd'.  You also modify the existing defines to match your
  153. machine's software.
  154.  
  155. If BASH still won't compile, perhaps because of missing code that
  156. is required for your YoYo machine, you will have to write that code
  157. and place it within a conditional block based on YoYo.
  158.  
  159. Most machines aren't that difficult; simply redefining a few of the
  160. default values is sufficient.  If you do run across a difficult
  161. machine, please send all fixes and changes to
  162. bash-maintainers@prep.ai.mit.edu in the form of context diffs:
  163.  
  164.      diff -c orig-machines.h machines.h >machines.diffs
  165.  
  166. Please include information about which version of the shell you have.
  167.  
  168. For those machines which prove more difficult, or if you are not
  169. sure about where to start, the scripts in the `portbash' directory
  170. may prove helpful.
  171.  
  172. File: bash.info,  Node: Bugs,  Prev: Porting,  Up: Install
  173.  
  174. Reporting Bugs
  175. ==============
  176.  
  177. If you find a bug in bash, you should report it.  But first you
  178. should make sure that it really is a bug and that it appears in the
  179. latest version of BASH that is available.
  180.  
  181. Once you have ascertained that a bug really exists, you are welcome
  182. to mail in a bug report.  If you have a fix, please mail that too!
  183. The program `bashbug' is used to submit bug reports.
  184.  
  185. Suggestions and "philosophical" bug reports should be mailed to
  186. bug-bash@ai.mit.edu.  Genuine bug reports should be mailed to the
  187. same place, or to bash-maintainers@prep.ai.mit.edu.  The `bashbug'
  188. script sends its messages to bug-bash@prep.ai.mit.edu.
  189.  
  190. *All* bug reports should include:
  191.  
  192.    * The version number of BASH.
  193.  
  194.    * The hardware and operating system used.
  195.  
  196.    * The compiler used to compile BASH.
  197.  
  198.    * A description of the bug's behavior.
  199.  
  200.    * A short script or "recipe" which demonstrates the bug.
  201.  
  202. The `bashbug' program includes much of this information
  203. automatically.  Without this information, it is generally not
  204. possible to successfully debug BASH.  Usually, without this
  205. information, the bug won't manifest itself! 
  206.  
  207. Discussion and questions about BASH in general (including
  208. questions about this documentation) can be sent to
  209. bash-maintainers@prep.ai.mit.edu. 
  210.